﻿namespace MobileTrack.Core.Data
{
    using System.Collections.Generic;
    using System.Linq;
    using MobileTrack.Core.Model;

    public interface IRepository<TEntity> where TEntity : BaseEntity
    {
        IQueryable<TEntity> All { get; }

        void Add(TEntity entity);

        void AddRange(IEnumerable<TEntity> entities);

        void Delete(long id);

        void Delete(TEntity entity);

        void DeleteRange(IEnumerable<TEntity> entities);
    }
}